/**
 * Copyright (C) 2024
 * All rights reserved, Designed By www.joolun.com
 * 注意：
 * 本软件为www.joolun.com开发研制，未经购买不得使用
 * 购买后可获得全部源代码（禁止转卖、分享、上传到码云、github等开源平台）
 * 一经发现盗用、分享等行为，将追究法律责任，后果自负
 */

import http from "@/api/api";

function getPage(query) {
	return http.requestNew("get", "/live/liveroom/page", {
		params: query
	});
}

function addObj(obj) {
	return http.requestNew("post", "/live/liveroom", {
		data: obj
	});
}

function getObj(id) {
	return http.requestNew("get", "/live/liveroom/" + id);
}

function delObj(id) {
	return http.requestNew("delete", "/live/liveroom/" + id);
}

function putObj(obj) {
	return http.requestNew("put", "/live/liveroom", {
		data: obj
	});
}
// 获取指定直播间推流地址
function getPushUrl(id) {
	return http.requestNew("get", `/live/liveroom/pushurl/${id}`);
}
export {
	getPage,
	addObj,
	getObj,
	delObj,
	putObj,
	getPushUrl
};
